<template>
  <div>
      <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="pname" label="姓名" width="80">
      </el-table-column>
      <el-table-column prop="pcard" label="身份证号" width="160">
      </el-table-column>
      <el-table-column prop="ptel" label="联系电话" width="100">
      </el-table-column>
      <el-table-column prop="page" label="年龄" width="60"> 
      </el-table-column>
            <el-table-column prop="psex" label="性别" width="60"> 
      </el-table-column>
            <el-table-column prop="paddress" label="住址" width="150"> 
      </el-table-column>
            <el-table-column prop="pbirthday" label="出生日期" width="100"> 
      </el-table-column>
            <el-table-column label="头像" width="180" >
      <template slot-scope="scope" >
        <img :src="scope.row.pimage"  class="picture"/>
      </template> 
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  mounted() {
    this.updateTable();
  },
  data() {
    return {
      tableData: [],
      form: {
        pname: "",
        pcard: "",
        page: "",
        paddress: "",
        psex: "",
        ptel: "",
        pbirthday: "",
        pimage: "",
      },
      formLabelWidth: "120px",
    };
  },
  methods: {
    updateTable() {
        // var pid = JSON.parse(sessionStorage.getItem("patientinfo")).patId;
      //   let config = {
      //     headers: {
      //      "Content-Type": "text/plain"
      //       }
      // }
          let did=1;
          this.$axios.get("doctor-serv/doctor/getAllpatientInfo/"+did).then((response) => {
          let r = response.data;
          console.log(r);
          this.tableData=r.data;
        });
      // console.log( sessionStorage.getItem('patientinfo'));

    },

        updateUI(row) {
          // console.log(this.form.getItem);
      this.dialogFormVisible = true;
      // 回显数据
      this.form = row;
    }
  }
};
</script>
<style>

</style>